<template>
  <div class="wrapper">
    <swiper :options="swiperOption">
        <!-- slides -->
        <swiper-slide><img class="swiper-img" src="http://static.zongheng.com/upload/recommend/de/4e/de4e421dda82d12372ad01f8871eb9da.jpeg" alt=""></swiper-slide>
        <swiper-slide><img class="swiper-img"  src="http://static.zongheng.com/upload/recommend/19/0f/190f29379fc768e48092844a6a4b07dd.jpeg" alt=""></swiper-slide>
        <!-- Optional controls -->
        <div class="swiper-pagination"  slot="pagination"></div>
      </swiper>
  </div>
</template>

<script>
export default {
  name: 'NavbarSwiper',
  props: {
    list: Array
  },
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true
      }
    }
  },
  computed: {
    showSwiper () {
      return this.list.length
    }
  }
}
</script>

<style lang="stylus" scoped>
  .wrapper
    overflow: hidden
    width: 50%
    height: 0
    padding-bottom 20%
    background red
    .swiper-img
      width: 100%
      height 5.5rem
</style>
